<?php
/**
 * @author Admin
 *
 */
class DisplayGalleryView extends GalleryView {

	/**
	 *
	 * @see GalleryView::render()
	 */
	public  function render( $config = NULL ) {
		    $cur = $this->_controller->uri->segment(6, 0);
			$renderer = new MultipleImageGallery();
			$renderer->base = 'templates/multiple_configure_gallery';
			$ci = & get_instance();

			foreach ( $this->query as $dat ){	
				$selected = TRUE;	
				$img =new Image($dat->location, (int)$config["maxwidth"],$dat->width,$dat->height,"/thumbs_",TRUE);
				$img->finalize();
				$wrapper = new ImageViewWrapper($dat->title);
				$wrapper->id = "img$dat->id";
				$wrapper->imgId = $dat->id;
				$wrapper->selected = $selected;				
				$wrapper->title = $dat->title;
				$wrapper->preview = $dat->location;
				$wrapper->addChild($img);
				$wrapper->finalize();
				$renderer->addChild($wrapper);
				$renderer->addJSInit("$(function() {
				$('div.imgsectionDisplay img').delay(100).queue( function(){ 
					$('div.imgsectionDisplay img').verticalAlign(); });
				});"); 
			}
			$renderer->finalize();
	}
}


?>